package com.cskaoyan.service.wx.impl;

import com.cskaoyan.bean.vo.wx.wxhome.WXHomeAboutVO;
import com.cskaoyan.mapper.AdminConfigMapper;
import com.cskaoyan.service.wx.WXHomeAboutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author : Caspar
 * @since : 2022.06.29 23:22
 */
@Service
public class WXHomeAboutServiceImpl implements WXHomeAboutService {
    /**
     * 配置的详细信息展现在小程序中
     *
     * @return com.cskaoyan.bean.vo.wx.wxhome.WXHomeAboutVO
     * @author: Caspar CXC
     * @since 2022/06/29 23:30
     */

    @Autowired
    AdminConfigMapper adminConfigMapper;

    @Override
    public WXHomeAboutVO about() {

        WXHomeAboutVO wxHomeAboutVO = new WXHomeAboutVO();
        String qq = adminConfigMapper.queryMarketMallQQ();
        String phone = adminConfigMapper.queryMarketMallPhone();
        String address = adminConfigMapper.queryMarketMallAddress();
        String latitude = adminConfigMapper.queryMarketMallLatitude();
        String longitude = adminConfigMapper.queryMarketMallLongitude();
        String name = adminConfigMapper.queryMarketMallName();

        wxHomeAboutVO.setQq(qq);
        wxHomeAboutVO.setPhone(phone);
        wxHomeAboutVO.setAddress(address);
        wxHomeAboutVO.setLatitude(latitude);
        wxHomeAboutVO.setLongitude(longitude);
        wxHomeAboutVO.setName(name);
        return wxHomeAboutVO;
    }
}
